#ifdef _TESTES_

#include "../Pilha.hpp"

class PilhaClient : public Pilha {

    public :

        void escreve(int dest, int tam, unsigned char* data);
        unsigned int le(unsigned char* b, unsigned int t);

    //private :

        Pilha* link;
};

class PilhaServer : public Pilha {

    public :

        void escreve(int dest, int tam, unsigned char* data) {

            if (dest == 1) {

                this->link1->escreve(dest, tam, data);
            } else  {

                this->link2->escreve(dest, tam, data);
            }
        };

        unsigned int le(unsigned char* b, unsigned int t) {

            
        };

    //private :

        Pilha* link1;
        Pilha* link2;
};

int main(int argc, char* argv[]) {
    
    PilhaClient* pc1 = new PilhaClient();
    PilhaClient* pc2 = new PilhaClient();
    PilhaServer* ps = new PilhaServer();
    pc1->link = ps;
    pc2->link = ps;
    ps->link1 = pc1;
    ps->link2 = pc2;

    delete ps;
    delete pc1;
    delete pc2;
    
    return 0;
}
#endif
